// pages/store/store.js
Page({

  data: {
      storeLists:[]
  
  },

  onLoad: function (options) {
  
  },

  onReady: function () {
  
  },

  onShow: function () {
        var that = this;
          wx.request({
              url:'https://www.magicmanufactory.com/c2mwebservice/api/v2/public/storesAndServicePoints', 
          header: {
              'content-type': 'application/json'
          },
          success: function (res) {
              that.setData({
                  storeLists: res.data.returnData
                })

                // that.setData({
                //     storeLists: allProvince
                // })
              }
      })
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {
  
  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {
  
  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
  
  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {
  
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
      return {
          title: 'Cotte',
          desc: '酷特智能'
      }
  },
  toPhone: function (event){
       wx.makePhoneCall({
           phoneNumber: event.target.id
      })
  }
})